# Copyright (c) 2024 by Daeridanii
#
# Endless Sky is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later version.
#
# Endless Sky is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <https://www.gnu.org/licenses/>.

outfit `"Ojet" Bimodal Coilgun`
	category "Guns"
	series "Guns"
	index 11010
	cost 1370000
	thumbnail "outfit/bimodal coilgun"
	licenses
		"High Houses"
	"mass" 22
	"outfit space" -22
	"weapon capacity" -22
	"gun ports" -1
	weapon
		sprite "projectile/bimodal"
			"frame rate" 5
			"start frame" 0
			"no repeat"
		sound "bimodal"
		"hit effect" "bimodal impact"
		"fire effect" "moonbeam fleck" 4
		"inaccuracy" 1
		"velocity" 30
		"lifetime" 15
		"range override" 900
		"burst count" 12
		"burst reload" 6
		"reload" 30
		"firing energy" 80
		"firing heat" 120
		"firing force" 25
		# Because parent projectiles inherit the damage of their submunitions, we must subtract the total damage of all submunitions from the parent projectile to get the desired behavior (different damage profiles over different ranges).
		"shield damage" -94
		# 50 (parent) - 3*48 (child)
		# close: 50 shield damage
		# far: 144 shield damage
		"hull damage" 93
		# 135 (parent) - 3*14 (child)
		# close: 135 hull damage
		# far: 42 hull damage
		"hit force" 120
		"cluster"
		"submunition" "Bimodal Switch" 3
	description "精密にして致命的なオジェト・バイモーダル・コイルガンは、人間が星々へ出るよりはるか前から、高位家門が選んできた武装だ。ごく単純に、完璧な武器として設計された。プリデセッサーの帝国が倒れる頃には、彼らは千年以上にわたって、船に他の武器を積む必要をまったく感じていなかったという。"
	description "	オジェトは超高密度の荷電粒子の塊を放ち、それは飛ぶにつれて散らばっていく。近距離では凝集した弾が装甲を貫き、遠距離ではイオンの飛沫がシールドを不安定にする。つまり、この武器を積んだ船は交戦する距離を変えるだけで与える損害の性質を調整でき、どんな相手にも高い効き目を発揮できる。"

outfit "Bimodal Coilgun Turret"
	"display name" "バイモーダル・コイルガン砲塔"
	plural "バイモーダル・コイルガン砲塔"
	category "Turrets"
	series "Turrets"
	index 11010
	cost 2950000
	thumbnail "outfit/bimodal coilgun turret"
	licenses
		"High Houses"
	"mass" 55
	"outfit space" -55
	"weapon capacity" -55
	"turret mounts" -1
	"required crew" 1
	weapon
		"hardpoint sprite" "hardpoint/bimodal turret"
		"hardpoint offset" 12
		sprite "projectile/bimodal"
			"frame rate" 5
			"start frame" 0
			"no repeat"
		sound "bimodal"
		"hit effect" "bimodal impact"
		"fire effect" "moonbeam fleck" 4
		"inaccuracy" 1
		"velocity" 30
		"lifetime" 15
		"range override" 900
		"turret turn" 1
		"burst count" 24
		"burst reload" 3
		"reload" 15
		"firing energy" 80
		"firing heat" 120
		"firing force" 25
		"shield damage" -94
		"hull damage" 93
		"hit force" 120
		"cluster"
		"submunition" "Bimodal Switch" 3
	description "サクセサーの軍艦は伝統的に固定武装で敵を相手取ってきたが、高位家門は、大型で鈍い船が小回りの利く相手にも戦える力を保てるよう、オジェト・コイルガンの砲塔型も製造している。この武器を二門横並びに据え、固定の取付部と足並みをそろえるため、一斉射あたり二倍の弾を放つよう仕組まれている。"

effect "bimodal impact"
	sprite "effect/bimodal impact"
		"frame rate" 30
		"no repeat"
	lifetime 8
	"velocity scale" 0.2

outfit "Bimodal Switch"
	"display name" "バイモーダル・スイッチ"
	plural "バイモーダル・スイッチ"
	weapon
		sprite "projectile/bimodal switch"
			"random start frame"
			"frame rate" 20
		"hit effect" "bimodal switch impact"
		"inaccuracy" 10
		"velocity" 30
		"lifetime" 6
		"random lifetime" 3
		"shield damage" 48
		"hull damage" 14

effect "bimodal switch impact"
	sprite "effect/bimodal switch impact"
		"frame rate" 12
		"no repeat"
	lifetime 30
	"velocity scale" 0.02

outfit "Drag Cannon"
	"display name" "ドラッグ・キャノン"
	plural "ドラッグ・キャノン"
	category "Guns"
	series "Guns"
	index 11020
	cost 455000
	thumbnail "outfit/drag cannon"
	licenses
		"High Houses"
	"mass" 12
	"outfit space" -12
	"weapon capacity" -12
	"gun ports" -1
	weapon
		sound "drag cannon"
		"fire effect" "moonbeam fleck" 2
		"hit effect" "drag cannon impact" 3
		"velocity" 0
		"lifetime" 0
		"range override" 375
		"velocity override" 25
		"burst count" 6
		"burst reload" 6
		"reload" 45
		"firing energy" 30
		"firing heat" 55
		"cluster"
		"submunition" "Drag Projectile" 3
	description "サクセサーは昔から実体弾兵器を好み、それは今日まで続いている。ドラッグ・キャノンは短射程で命中精度の低い弾を撒き散らすが、大きな損害を与えるだけでなく、標的のエンジンを一時的に乱す。"
	description "	使い込まれたオジェト・コイルガンに比べれば無骨な設計で、そのぶん評価も低いが、ドラッグ・キャノンはサクセサーの高速攻撃艇で居場所を得ている。主に敵船を遅らせ、より大きな艦隊が仕留められるようにする道具としてだ。"

outfit "Drag Projectile"
	"display name" "ドラッグ弾"
	plural "ドラッグ弾"
	weapon
		sprite "projectile/drag cannon"
			"frame rate" 20
			"no repeat"
		"hit effect" "drag cannon impact"
		"inaccuracy" 20
		"velocity" 25
		"lifetime" 10
		"random lifetime" 5
		"slowing damage" 0.45
		"shield damage" 52
		"hull damage" 48

effect "drag cannon impact"
	sprite "effect/drag cannon impact"
		"frame rate" 10
		"no repeat"
	lifetime 20
	"velocity scale" 0
	"random velocity" 1

outfit "Successor Pulse Laser"
	"display name" "サクセサー・パルスレーザー"
	plural "サクセサー・パルスレーザー"
	category "Guns"
	series "Guns"
	index 11030
	cost 69000
	thumbnail "outfit/successor pulse laser"
	licenses
		"Successor"
	"mass" 10
	"outfit space" -10
	"weapon capacity" -10
	"gun ports" -1
	weapon
		sprite "projectile/successor pulse laser"
			"random start frame"
			"frame rate" 5
		sound "successor pulse laser"
		"hit effect" "successor pulse laser impact"
		"inaccuracy" 0.4
		"velocity" 490
		"lifetime" 1
		"burst count" 9
		"burst reload" 1
		"reload" 6
		"firing energy" 11
		"firing heat" 15
		"shield damage" 10.5
		"hull damage" 12
		"piercing" 0.05
	description "シールドを貫くこのレーザーは、高位家門の庇護と制約の下ではなく、サクセサー宙域で独立して作られている数少ない武器の一つだ。そのため、とりわけ強力でも効率的でもないが、安価で場所も取らないため、高位家門のより強力な武器を手にできない者にとっては、それなりに魅力的な守りの選択肢になっている。"

outfit "Pulse Laser Turret"
	"display name" "パルスレーザー砲塔"
	plural "パルスレーザー砲塔"
	category "Turrets"
	series "Turrets"
	index 11020
	cost 145000
	thumbnail "outfit/successor pulse laser turret"
	licenses
		"Successor"
	"mass" 30
	"outfit space" -30
	"weapon capacity" -30
	"turret mounts" -1
	"required crew" 1
	weapon
		sprite "projectile/successor pulse laser"
			"random start frame"
			"frame rate" 5
		"hardpoint sprite" "hardpoint/successor pulse laser turret"
		"hardpoint offset" 8
		sound "successor pulse laser"
		"hit effect" "successor pulse laser impact"
		"inaccuracy" 0.4
		"velocity" 490
		"turret turn" 2.6
		"lifetime" 1
		"burst count" 9
		"burst reload" 1
		"reload" 3
		"firing energy" 11
		"firing heat" 15
		"shield damage" 10.5
		"hull damage" 12
		"piercing" 0.05
	description "パルスレーザーの登場は、高位家門の中でも目端の利く者にとって警鐘だった。何百年ぶりかで、自分たち以外の集団が武器を作り始めたからだ。サクセサーの多くは、その砲塔型を暴力の民主化の続きと見ているが、疑り深い者は、高位家門が製造に潜り込んでわざと設計を損なったのだと言う。"

effect "successor pulse laser impact"
	sprite "effect/successor pulse laser impact"
		"frame rate" 30
		"random start frame"
	lifetime 3
	"velocity scale" 0

outfit "Overcharged Pulse Laser"
	"display name" "超負荷パルスレーザー"
	plural "超負荷パルスレーザー"
	category "Guns"
	series "Guns"
	index 11040
	cost 84000
	thumbnail "outfit/overcharged pulse laser"
	licenses
		"Successor"
	"mass" 12
	"outfit space" -12
	"weapon capacity" -12
	"gun ports" -1
	weapon
		sprite "projectile/successor pulse laser"
			"start frame" 2
			"frame rate" 8
			"rewind"
		sound "overcharged pulse laser"
		"hit effect" "overcharged pulse laser impact"
		"inaccuracy" 5.5
		"velocity" 490
		"lifetime" 1
		"burst count" 4
		"burst reload" 1
		"reload" 7
		"firing energy" 9.1
		"firing heat" 30.8
		"shield damage" 14
		"hull damage" 13.3
		"piercing" 0.05
		"cluster"
	description "高位家門が作る上質な武器を大量には手にできないため、人民家は手に入るもので間に合わせるほかなかった。主に、サクセサー宙域で独立して作られている比較的低出力のパルスレーザーだ。このパルスレーザーは安全装置を外し、光学系を強化してあり、発熱が大幅に増える代わりに、より少ない電力でシールドに大きな損害を与えられる。"

outfit "Overcharged Laser Turret"
	"display name" "超負荷レーザー砲塔"
	plural "超負荷レーザー砲塔"
	category "Turrets"
	series "Turrets"
	index 11030
	cost 136000
	thumbnail "outfit/overcharged pulse laser turret"
	licenses
		"Successor"
	"mass" 24
	"outfit space" -24
	"weapon capacity" -24
	"turret mounts" -1
	"required crew" 1
	weapon
		sprite "projectile/successor pulse laser"
			"start frame" 2
			"frame rate" 8
			"rewind"
		"hardpoint sprite" "hardpoint/overcharged pulse laser turret"
		"hardpoint offset" 8
		sound "overcharged pulse laser"
		"hit effect" "overcharged pulse laser impact"
		"inaccuracy" 5.5
		"velocity" 490
		"lifetime" 1
		"turret turn" 3
		"burst count" 4
		"burst reload" 1
		"reload" 7
		"firing energy" 12.6
		"firing heat" 43.05
		"shield damage" 19.6
		"hull damage" 18.667
		"piercing" 0.05
		"cluster"
	description "人民家のとりわけ個性的な者たちが手作りしたこの特注の超負荷パルスレーザー砲塔は、固定型よりもさらに多くの電力をレーザー発振器へ注ぎ込んでおり、この大きさの武器としては実に途方もない熱を出す。無骨な設計にもかかわらず、シールドを部分的に貫く力を保っていることを思えば、やはり恐ろしい武器だ。"

effect "overcharged pulse laser impact"
	sprite "effect/overcharged pulse laser impact"
		"frame rate" 30
		"random start frame"
	lifetime 6
	"velocity scale" 0

outfit `"Sjeja" Kinetic Lance`
	category "Secondary Weapons"
	series "Secondary Weapons"
	index 11010
	cost 3500000
	licenses
		"High Houses"
	thumbnail "outfit/sjeja kinetic lance"
	"mass" 54
	"outfit space" -60
	"weapon capacity" -60
	"energy capacity" 1900
	"gun ports" -1
	"spike capacity" 20
	weapon
		sprite "projectile/sjeja kinetic lance"
			"frame rate" 4
			"random start frame"
		sound "sjeja lance"
		ammo "High-Velocity Spike"
		icon "icon/hv spike"
		"fire effect" "moonbeam fleck" 20
		"fire effect" "electron impact"
		"hit effect" "torpedo hit"
		"cluster"
		"velocity" 320
		"lifetime" 8
		"reload" 160
		"firing force" 800
		"firing energy" 1900
		"firing ion" 3.0
		"firing heat" 4000
		"shield damage" 1069
		"hull damage" 1920
		"piercing" 0.15
		"hit force" 800
		"penetration count" 5
	description "サクセサーの現代兵器で最大にして最強のこの巨大な超伝導コイルガンは、その簡潔さにおいて優美であり、極めて遠い距離から標的を鮮やかに貫く。発射には相当な電力の一気放出が要るが、その一部をコイル自体に蓄えられるため、船の機構に電力の負担を長く残す代わりに、追加の蓄電池なしでも撃てる。"
	description "	この武器の弾薬はどの装備店でも補充できる。"
		to display
			has "gamerule: universal ammo restocking"

outfit "High-Velocity Spike"
	"display name" "高速スパイク"
	plural "高速スパイク"
	category "Ammunition"
	series "Ammunition"
	index 11010
	cost 3500
	thumbnail "outfit/hv spike"
	"mass" .5
	"spike capacity" -1
	description "スジェヤ運動エネルギー槍が放つ弾は大きすぎて、船の備蓄からその場で作ることができず、別に積んでおかねばならない。"

outfit "High-Velocity Spike Rack"
	"display name" "高速スパイク収納庫"
	plural "高速スパイク収納庫"
	category "Ammunition"
	series "Ammunition"
	index 11020
	cost 50000
	licenses
		"High Houses"
	thumbnail "outfit/hv spike rack"
	"mass" 7
	"outfit space" -12
	"energy capacity" 800
	"spike capacity" 16
	ammo "High-Velocity Spike"
	description "スジェヤ運動エネルギー槍の内蔵の弾薬は、よほど長引く交戦でもなければ十分に足りるが、高位家門は最大級の軍艦向けにこの追加の収納庫も製造している。この収納庫には、スジェヤの高い電力消費を支えるための小さな蓄電池群も含まれている。"

outfitter "Kinetic Lance Restock"
	to sell
		has "gamerule: universal ammo restocking"
		or
			has `outfit: "Sjeja" Kinetic Lance`
			has "outfit: High-Velocity Spike Rack"
	location
		attributes "outfitter"
	stock
		"High-Velocity Spike"
